<script setup lang="ts">
  import {ref} from "vue";
  import {makeStatus} from "@/apps/client/utils/recordStatusUtil"
  const props = defineProps<{
    data: object
  }>()
  const data = props.data
  //console.log(data)
  const statusText = makeStatus(data)
  //console.log(statusText)
  // function setStatus(color, text){
  //   statusText.value = {
  //     color: color,
  //     text: text
  //   }
  // }
  // if (data.status == "PENDING"){
  //   setStatus('#FFA500', "审核中")
  // } else if(data.status == "APPROVED"){
  //   setStatus('green',"已通过")
  // } else if(data.status == "CANCELLED"){
  //   setStatus('#909399',"已取消")
  // } else if(data.status == "REJECTED"){
  //   setStatus('red',"未通过")
  // }
//409EFF

</script>

<template>
  <van-cell>
    <template #title>
      <div style="display: flex; justify-content: space-between">
        <p style="font-weight: bold;">{{ data.roomTypeName }} / {{data.roomSubTypeName}} {{ data.roomNumber }} {{ data.cubicleNumber }}</p>
        <p :style="{ color: statusText.color }">{{ statusText.text }}</p>
      </div>
    </template>
  </van-cell>
</template>

<style scoped>
  p {
    margin: 6px;
    --van-cell-font-size: 1rem;
  }
</style>